﻿namespace KingerRobot.MexicoSailunMDC.SpiService;
internal interface IProdSkuProduct
{
    /// <summary>
    /// 获得所有的信息
    /// </summary>
    /// <returns></returns>
    List<POProdSkuProduct> GetProdSkuProducts();
    /// <summary>
    /// 创建产品物料关联
    /// </summary>
    /// <param name="skuId"></param>
    /// <param name="productId">产品ID</param>
    /// <param name="materialId">物料ID</param>
    /// <returns>产品物料关联</returns>
    POProdSkuProduct CreateProdSkuProduct(long skuId, long productId, long materialId, DateTime? mdTime);

    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="skuId"></param>
    /// <returns></returns>
    POProdSkuProduct DeleteProdSkuProduct(long? skuId);

    /// <summary>
    /// 通过产品id删除
    /// </summary>
    /// <param name="productId"></param>
    /// <returns></returns>
    POProdSkuProduct DeleteProdSkuProductByProductId(long? productId);

    /// <summary>
    /// 通过 skuId 获取信息
    /// </summary>
    /// <param name="skuId"></param>
    /// <returns></returns>
    POProdSkuProduct GetProdSkuProductBySkuId(long? skuId);
    /// <summary>
    /// 获取产品
    /// </summary>
    /// <param name="skuIds"></param>
    /// <returns></returns>
    List<POProdSkuProduct> GetProdSkuProductBySkuIds(List<long> skuIds);

    /// <summary>
    /// 获取在仓库中的产品
    /// </summary>
    /// <param name="skuIds"></param>
    /// <returns></returns>
    //List<POProdSkuProduct> GetInWarehouseProdSkuProductBySkuIds(List<long> skuIds);

    /// <summary>
    ///根据物料获取在仓库中的产品
    /// </summary>
    /// <param name="skuIds"></param>
    /// <param name="materialId"></param>
    /// <returns></returns>
    public List<long?> GetProdSkuProductBySkuIdsAndMaterial(List<long> skuIds, long materialId);

    /// <summary>
    /// 通过获取 <see langword="productId"/>获取<see cref="POProdProduct"/>
    /// </summary>
    /// <param name="productId"></param>
    /// <returns></returns>
    POProdSkuProduct GetProdSkuProductByProductId(long productId);
    /// <summary>
    /// 修改物料
    /// </summary>
    /// <param name="productId"></param>
    /// <param name="materialId"></param>
    /// <returns></returns>
    int UpdateSkuProductMaterial(long productId, long mateiralId);


    /// <summary>
    /// 修改标志
    /// </summary>
    /// <param name="taskno"></param>

    /// <returns></returns>
    int UpdateSkuProductOutBoundFlag(long skuId);
}
